SELECT     INFORMATION_SCHEMA.TABLE_CONSTRAINTS.TABLE_CATALOG, INFORMATION_SCHEMA.TABLE_CONSTRAINTS.TABLE_SCHEMA, 
                      INFORMATION_SCHEMA.TABLE_CONSTRAINTS.TABLE_NAME, INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_NAME, 
                      INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_TYPE, INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.COLUMN_NAME
FROM         INFORMATION_SCHEMA.TABLE_CONSTRAINTS WITH (NOLOCK) INNER JOIN
                      INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE WITH (NOLOCK) ON 
                      INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_CATALOG = INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.CONSTRAINT_CATALOG
                       AND 
                      INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_SCHEMA = INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.CONSTRAINT_SCHEMA
                       AND 
                      INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_NAME = INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.CONSTRAINT_NAME LEFT
                       OUTER JOIN
                      INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WITH (NOLOCK) ON 
                      INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_CATALOG = INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS.CONSTRAINT_CATALOG
                       AND 
                      INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_SCHEMA = INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA
                       AND 
                      INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_NAME = INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME
WHERE     (INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS.CONSTRAINT_CATALOG IS NULL AND INFORMATION_SCHEMA.TABLE_CONSTRAINTS.TABLE_NAME <> 'sysdiagrams')
ORDER BY TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, CONSTRAINT_NAME